import request from '@/utils/request'

export function loginByOpenid(params) {
  return request({
    url: '/openApi/student/loginByOpenid',
    method: 'get',
    params: params
  })
}

export function createToken(params) {
  return request({
    url: '/openApi/student/createToken',
    method: 'get',
    params: params
  })
}

export function findStudentById(params) {
  return request({
    url: '/studentApi/student/findStudentById',
    method: 'get',
    params: params
  })
}

export function findStudentByToken(params) {
  return request({
    url: '/studentApi/student/findStudentByToken',
    method: 'get',
    params: params
  })
}

export function updateStudentByToken(data) {
  return request({
    url: '/studentApi/student/updateStudentByToken',
    method: 'put',
    data: data
  })
}

export function getWxJsConfig(params) {
  return request({
    url: '/studentApi/student/getWxJsConfig',
    method: 'get',
    params: params
  })
}